use serial_cmd::utils::{common::generate_builder, session::Session};

fn main() {
    let builder = generate_builder();

    let mut ss = Session::new(builder.expect("msg"));
    ss.run();

    let mut line = String::new();

    loop {
        line.clear();
        match std::io::stdin().read_line(&mut line) {
            Ok(_) => {
                // ss.send(&line.trim());
                ss.send(&line);
            }
            Err(err) => {
                eprintln!("error :{}", err)
            }
        }
    }
}
